package com.sportradar.assessment.work.threads;

import java.util.concurrent.TimeUnit;

import com.sportradar.assessment.work.services.NumberProgression;
import com.sportradar.assessment.work.services.ThreadManager;

public class NumberProgressionThread implements Runnable{
	
	private NumberProgression numberProgression;
	private String threadName;
	private ThreadManager threadManager;
	private long frequencyOfCalculation;
	
	public NumberProgressionThread(String name,ThreadManager threadManager){
		this.threadName=name;
		this.threadManager=threadManager;
	}

	public void run() {

		
		while(true){
			try {
				threadManager.executeCalculation(this.threadName);
			} catch (InterruptedException e) {				
				e.printStackTrace();
			}
				
		}
		
	}

	
}
